package net.novasharper.icarus.rpgengine;

import org.newdawn.slick.opengl.Texture;

public abstract class EntityPattern {
	public EntityPattern() { }
	
	/*
	 * Up, Right, Down, Left 
	 */
	
	protected String name;
	protected String currentAction;
	protected int index;
	protected Role myRole;
	
	public EntityPattern(Texture moving_, Texture static_, String name) {
		this.addSpriteSheet("static", static_, 4, 1);
		this.addSpriteSheet("moving", moving_, 4, 1);
	}
	
	public void addTexture(String action, Texture tex) {
		Game.getRenderEngine().registerTexture(this.name + "." + action, tex);
	}
	
	public void addSpriteSheet(String action, Texture tex, int width, int height) {
		Game.getRenderEngine().registerSpriteSheet(this.name + "." + action, tex, width, height);
	}
	
	public String getDeath() {
		return this.name + ".death";
	}
	
	public abstract void update();
}
